<extend name="Public:base" />
<block name="head_script">
<link href="__CSS__/member.css" rel="stylesheet" type="text/css">  
<link href="__PUBLIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> 	
</block>
<block name="content">   
<div>
	<div class="container">
		<div class="row">
			
			<div id="content" class="col-sm-9">
				<div class="page-title">
					<h1>地址簿</h1>
				</div>
				<table class="table table-bordered table-hover">
					<tbody>
						<volist name="address" id="list">
						<tr>
							<td class="text-left">
								{$list.name}<br />
								
								<?php echo get_area_name($list['province_id']); ?><br />
								<?php echo get_area_name($list['city_id']); ?> <br />
								<?php echo get_area_name($list['country_id']); ?><br />
								{$list.telephone}<br />
								{$list.address}
							</td>
							<td class="text-right">
								<a href="{:U('/edit_address/'.$list['address_id'])}">
									<button class="button">编辑</button>
								</a>
								<a href="{:U('/delete_address/'.$list['address_id'])}">
									<button class="button">删除</button>
								</a>
							</td>
						</tr>
						</volist>
					</tbody>
				</table>		
				<div class="buttons clearfix">
					<div class="left">
						<a href="{:U('/add_address')}">
							<button class="button newaddress">新增地址</button>
						</a>
					</div>
				</div>	
			</div>
			<include file="User/side" />
		</div>
	</div>
</div>	 
</block>